
#ifndef _SERIAL_H
#define _SERIAL_H

struct CISerial
{
	enum
	{
		LENGTH   = 0,
		CURRENT  = 1,
		LEFT     = 2		
	};

	enum
	{
		ERR_NO     = 0,
		ERR_HANDLE = 1,
		ERR_READ   = 2,
		ERR_WRITE  = 3
	};

	virtual int Read(void* pBuf,  int nSize) = 0;
	virtual int Write(void* pBuf, int nSize) = 0;
	virtual int Error() = 0;
	virtual int Size(int flag)  = 0;
};
typedef int (CISerial::*SERIAL_FUNC)(void*, int);
#endif